import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'

// 加载 element 组件库的样式
import 'element-ui/lib/theme-chalk/index.css'
import { getUrlParam } from './utils/utils.js'
import _ from 'lodash'
import * as conditions from '@/data/deviceCondition'

Vue.config.productionTip = false
Object.keys(conditions).forEach(key => {
  Vue.prototype[key] = conditions[key]
})
Vue.filter('removeComma', function (value) {
  if (value) {
    return value.replace(/,$/gi, '')
  } else {
    return ''
  }
})
Vue.use(ElementUI)
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

Vue.prototype.getUrlParam = getUrlParam
Vue.prototype._ = _
